package com.example.easybuy.service.impl;

import com.example.easybuy.mapper.EasybuyOrderMapper;
import com.example.easybuy.pojo.EasybuyOrder;
import com.example.easybuy.service.EasybuyOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 张子晨
 * @since 2021-03-12
 */
@Service
public class EasybuyOrderServiceImpl implements EasybuyOrderService {

    @Autowired
    private EasybuyOrderMapper easybuyOrderMapper;

    @Override
    public int addOrder(Map<String, Object> params) {
        return easybuyOrderMapper.addOrder(params);
    }

    @Override
    public EasybuyOrder selectOrderBySerialNumber(String serialNumber) {
        return easybuyOrderMapper.selectOrderBySerialNumber(serialNumber);
    }

    @Override
    public List<EasybuyOrder> getAllOrderByUserId(Integer userId) {
        return easybuyOrderMapper.getAllOrderByUserId(userId);
    }
}
